package com.wuseguang.springcloud.service;

import com.wuseguang.springcloud.client.ServiceList;
import com.wuseguang.springcloud.service.impl.BanCardsClientServiceFallbackFactory;
import com.wuseguang.springcloud.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;


@FeignClient(value = ServiceList.MICROSERVICECLOUD_BANCARDS, path = "/brands"/*, fallbackFactory = BanCardsClientServiceFallbackFactory.class*/)
public interface BanCardsClientService {

    @RequestMapping("/querySwitchingTime")
    Result querySwitchingTime(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryWeather")
    Result queryWeather(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/updateHeartBeatTime")
    Result updateHeartBeatTime(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryClassInformation")
    Result queryClassInformation(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/querySchoolInformation")
    Result querySchoolInformation(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryClassPictures")
    Result queryClassPictures(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryApplicationAll")
    Result queryApplicationAll(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryClassVideos")
    Result queryClassVideos(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryClassNotices")
    Result queryClassNotices(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/updateHeartbeatType")
    Result updateHeartbeatType(@RequestParam(value = "deviceid") String deviceid, @RequestParam(value = "type") String type);

    @RequestMapping("/updatePush")
    Result updatePush(@RequestParam(value = "deviceid") String deviceid, @RequestParam(value = "clientid") String clientid);

    @RequestMapping("/queryTimetable")
    Result queryTimetable(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryTodayDuty")
    Result queryTodayDuty(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/updateScreenShot")
    Result updateScreenShot(@RequestParam(value = "deviceid") String deviceid,
                            @RequestParam(value = "screenShotUrl") String screenShotUrl);

    @RequestMapping("/queryVolume")
    Result queryVolume(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryUpGradeUrl")
    Result queryUpGradeUrl(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryHeartBydeviceId")
    Result queryHeartBydeviceId(@RequestParam(value = "deviceid") String deviceid);

    //人脸考勤
    @RequestMapping("/queryAttendUserStatusAll")
    Result queryAttendUserStatusAll(@RequestParam(value = "deviceid") String deviceid,//设备id
                                    @RequestParam(value = "groupid", required = false) Integer groupid,//考勤组id
                                    @RequestParam(value = "grouptype", required = false) Integer grouptype,//考勤组类型 0学生考勤 1教室考勤
                                    @RequestParam(value = "shiftid", required = false) Integer shiftid,//班次id
                                    @RequestParam(value = "time", required = false) String time);

    @RequestMapping("/queryAttendGroupDialogAll")
    Result queryAttendGroupDialogAll(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/addAttend")
    Result addAttend(@RequestParam(value = "deviceid") String deviceid,//设备id
                     @RequestParam(value = "userid") Integer userid,//考勤人员id'
                     @RequestParam(value = "groupid") Integer groupid,//考勤组id
                     @RequestParam(value = "grouptype") Integer grouptype,//考勤组类别
                     @RequestParam(value = "shiftid") Integer shiftid,//班次id
                     @RequestParam(value = "time") String time);

    @RequestMapping("/updateEquipmentType")
    Result updateEquipmentType(@RequestParam(value = "deviceid") String deviceid,
                               @RequestParam(value = "deviceType") String deviceType);

    @RequestMapping("/updateVersionNumber")
    Result updateVersionNumber(@RequestParam(value = "deviceid") String deviceid,
                               @RequestParam(value = "version") String version);

    @RequestMapping("/queryEquipmentType")
    Result queryEquipmentType(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/findStudentFace")
    Result findStudentFace(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/informStudentFace")
    Result informStudentFace(@RequestParam(value = "faceList") String faceList, @RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/findDeleteStudentFace")
    Result findDeleteStudentFace(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryStudentVacationById")
    Result queryStudentVacationById(@RequestParam(value = "id") Integer id);

    @RequestMapping("/queryHeadMaster")
    Result queryHeadMaster(@RequestParam(value = "classId") Integer classId);

    @RequestMapping("/addStudentVacation")
    Result addStudentVacation(@RequestParam(value = "id") Integer id,//学生id
                              @RequestParam(value = "school_id") Integer school_id,//学校id
                              @RequestParam(value = "stime") String stime,//开始时间
                              @RequestParam(value = "etime") String etime,//结束时间
                              @RequestParam(value = "content", required = false) String content,//请假理由
                              @RequestParam(value = "type") Integer type);

    @RequestMapping("/delStudentVacation")
    Result delStudentVacation(@RequestParam(value = "id") Integer id);

    @RequestMapping("/queryClassNotice")
    Result queryClassNotice(@RequestParam(value = "classId") Integer classId,
                            @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                            @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/queryClassPicturesAll")
    Result queryClassPicturesAll(@RequestParam(value = "classId") Integer classId,
                                 @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                 @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/queryClassVideosAll")
    Result queryClassVideosAll(@RequestParam(value = "classId") Integer classId,
                               @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                               @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);


    @RequestMapping("/updateParentsLeaveMessagesState")
    Result updateParentsLeaveMessagesState(@RequestParam(value = "id") Integer id);

    @RequestMapping("/queryParentsLeaveMessages")
    Result queryParentsLeaveMessages(@RequestParam(value = "id") Integer id,
                                     @RequestParam(value = "type", required = false, defaultValue = "0") Integer type);

    @RequestMapping("/addParentsLeaveMessages")
    Result addParentsLeaveMessages(@RequestParam(value = "id") Integer id,
                                   @RequestParam(value = "type") Integer type,
                                   @RequestParam(value = "content") String content);

    @RequestMapping("/StudentCenterLogin")
    Result StudentCenterLogin(@RequestParam(value = "id") Integer id, @RequestParam(value = "password") String password);

    @RequestMapping("/queryStudentCenterAll")
    Result queryStudentCenterAll(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryPersonalApplication")
    Result queryPersonalApplication(@RequestParam(value = "deviceid") String deviceid, @RequestParam(value = "id") Integer id);

    @RequestMapping("/landingOfClassCards")
    Result landingOfClassCards(@RequestParam(value = "deviceid") String deviceid, @RequestParam(value = "password", required = false) String password);

    @PostMapping(value = "/brandUpload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    Result brandUpload(@RequestPart("file") MultipartFile file, @RequestParam("type") int type, @RequestParam(value = "deviceid") String deviceid);


    @RequestMapping("/guangxiZhuzongDocking")
    Result guangxiZhuzongDocking(@RequestBody Map<String, Object> map);

    @RequestMapping("/queryVacationById")
    Result queryVacationById(@RequestParam(value = "id") Integer id);

    @RequestMapping("/queryStudentAchievement")
    Result queryStudentAchievement(@RequestParam(value = "id") Integer id);

    @RequestMapping("/queryDutyAll")
    Result queryDutyAll(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/release")
    Result release(@RequestParam(value = "id") Integer id);

    @RequestMapping("/findClassEvaluationInformation")
    Result findClassEvaluationInformation(@RequestParam(value = "deviceid") String deviceid,
                                          @RequestParam(value = "findType", required = false, defaultValue = "0") Integer findType,
                                          @RequestParam(value = "startTime", required = false) String startTime,
                                          @RequestParam(value = "endTime", required = false) String endTime);

    @RequestMapping("/findSchoolFace")
    Result findSchoolFace(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/informSchoolFace")
    Result informSchoolFace(@RequestParam(value = "faceList") String faceList, @RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/findExamInformation")
    Result findExamInformation(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryPushLog")
    Result queryPushLog(@RequestParam(value = "deviceid", required = false) String deviceid);

    @RequestMapping("/queryParentActivitiyByDeviceid")
    Result queryParentActivitiyByDeviceid(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/queryActivitiyByIdList")
    Result queryActivitiyByIdList(@RequestParam(value = "id") Integer id,
                                  @RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/findDeleteStudentOtherFace")
    Result findDeleteStudentOtherFace(@RequestParam(value = "deviceid") String deviceid);

    @RequestMapping("/findInAndOutOfSchool")
    Result findInAndOutOfSchool(@RequestParam(value = "deviceid") String deviceid);


    /**
     *学生积分信息以及兑换详情
     * @param deviceid 班牌id
     * @param studentId 学生id
     * @return
     */
    @RequestMapping("/findStudentExchangeDetails")
    public Result findStudentExchangeDetails(@RequestParam(value = "deviceid") String deviceid,
                                             @RequestParam(value = "studentId") String studentId);

    /**
     * 学生兑换奖品
     * @param deviceid 班牌id
     * @param studentId 学生id
     * @param prizeId 奖品id
     * @return
     */
    @RequestMapping("/addStudentExchangeDetails")
    public Result addStudentExchangeDetails(@RequestParam(value = "deviceid") String deviceid,
                                            @RequestParam(value = "studentId") String studentId,
                                            @RequestParam(value = "studentName") String studentName,
                                            @RequestParam(value = "prizeId") String prizeId);
    /**
     * 查询奖品列表
     * @param deviceid
     * @return
     */
    @RequestMapping("/findPrizeList")
    public Result findPrizeList(@RequestParam(value = "deviceid") String deviceid);

    /**
     * 查询兑换记录
     * @param deviceid
     * @param studentId
     * @return
     */
    @RequestMapping("/findRecordList")
    public Result findRecordList(@RequestParam(value = "deviceid") String deviceid,
                                 @RequestParam(value = "studentId") String studentId);

    /**
     * 查询本周班级德育得分
     * @param deviceid
     * @return
     */
    @RequestMapping("/findMoralEducationRecord")
    public Result findMoralEducationRecord(@RequestParam(value = "deviceid") String deviceid);

    /**
     * 查询德育上周排名
     * @param deviceid
     * @return
     */
    @RequestMapping("/findRankingLastWeek")
    public Result findRankingLastWeek(@RequestParam(value = "deviceid") String deviceid);
}
